Indoor magnetic field based location discovery

ABSTRACT

There is provided an apparatus, wherein the apparatus is caused to acquire a location estimate of a positioning device that is to determine its location inside a building, wherein the location estimate is acquired on the basis of an indoor non-magnetic field based location discovery system; access an indoor Earth&#39;s magnetic field, EMF, map of plurality of buildings, wherein the indoor EMF map represents at least one of magnitude and direction of the Earth&#39;s magnetic field affected by the local structures of a corresponding building; and select a part of the indoor EMF map on the basis of the location estimate of the positioning device, wherein the selected part of the indoor magnetic field map includes the indoor EMF map for the area in which the positioning device currently is.

FIELD

The invention relates generally to indoor positioning systems. Moreparticularly, the invention relates to indoor location tracking byapplying both, Earth's magnetic field based location discovery andnon-magnetic field based location discovery.

BACKGROUND

It may be of importance to locate or track a user when the user isinside a building. However, a well-known outdoor positioning systememploying a global positioning system (GPS) or any other satellite basedsystem may not work inside a building due to lack of reliable receptionof satellite coverage. Therefore, a positioning technique utilizingEarth's magnetic fields (EMF) indoors has been developed as one possibleoption for indoor location discovery. This type of location discoveryapplies, for example, a magnetic field strength measured by apositioning device.

BRIEF DESCRIPTION OF THE INVENTION

According to an aspect of the invention, there are provided apparatusesas specified in claims 1, 19 and 20.

According to an aspect of the invention, there is provided a computerprogram product embodied on a distribution medium readable by a computerand comprising program instructions which, when loaded into anapparatus, cause the apparatus to execute any of the embodiments asdescribed in the appended claims.

According to an aspect of the invention, there is provided an apparatuscomprising means configured to cause the apparatus to perform any of theembodiments as described in the appended claims.

Embodiments of the invention are defined in the dependent claims.

LIST OF DRAWINGS

In the following, the invention will be described in greater detail withreference to the embodiments and the accompanying drawings, in which

FIG. 1 presents a floor plan of a building;

FIGS. 2A to 2C show a positioning device and an example measuredmagnetic field vector;

FIG. 3 shows a method according to an embodiment;

FIGS. 4A and 4B illustrate embodiments relating to the locationestimation and selection of a map part, according to some embodiments;

FIGS. 5A and 5B present some embodiments relating to the locationestimation;

FIGS. 6A to 6D show signaling flow diagrams, according to someembodiments;

FIGS. 7A and 7B illustrate some embodiments related to use ofprobabilities for the location of a positioning device;

FIGS. 8A and 8B show some embodiment relating to update of anon-magnetic filed based map;

FIGS. 9A to 9C show possible three dimensional orientations of thepositioning device; and

FIGS. 10 and 11 illustrate apparatuses according to embodiments.

DESCRIPTION OF EMBODIMENTS

The following embodiments are exemplary. Although the specification mayrefer to “an”, “one”, or “some” embodiment(s) in several locations ofthe text, this does not necessarily mean that each reference is made tothe same embodiment(s), or that a particular feature only applies to asingle embodiment. Single features of different embodiments may also becombined to provide other embodiments.

In order to enable positioning, a GPS based location discovery and/ortracking is known. The GPS location discovery may not, however, besuitable for indoors due to lack of satellite reception coverage. Forindoor based location tracking, RF based location discovery and locationtracking may be used. In such system, a round trip time of the RFsignal, or the power of the received RF signal, for example, may bedetermined to an indoor base station to which the user device isconnected to. This type of location tracking may suffer from a lack ofaccuracy, for example, when the user gets located by two different RFbase stations. Also, the coverage area of one base station may be wideresulting in poor accuracy. Some other known positioning measures, whichmay be applicable indoors, include machine vision, motion sensor anddistance measuring, for example. However, these may require expensivemeasuring devices and equipment mounted throughout the building. As afurther option, the utilization of Earth's magnetic field (EMF) may beapplied.

The material used for constructing the building may affect the EMFmeasurable in the building and also the EMF surrounding the building.For example, steel, reinforced concrete, and electrical systems mayaffect the EMF. The EMF may vary significantly between differentlocations in the building and may therefore enable accurate locationdiscovery and tracking inside the building based on the EMF localdeviations inside the building. On the other hand, the equipment placedin a certain location in the building may not affect the EMFsignificantly compared to the effect caused by the building material,etc. Therefore, even if the layout and amount of equipment and/orfurniture, etc., change, the measured EMF may not change significantly.

An example of a building 100 with 5 rooms, a corridor and a hall isdepicted in FIG. 1. It is to be noted that the embodiments of theinvention are also applicable to other type of buildings, includingmulti-floor buildings. The floor plan of the building 100 may berepresented in a certain frame of reference. A frame of reference mayrefer to a coordinate system or set of axes within which the position,orientation, etc. are measured, for example. Such a frame of referenceof the building in the example of FIG. 1 may be an XY coordinate system,also known in this application as the world coordinate system. Thecoordinate system of the building 100 may also be three dimensional whenvertical dimension needs to be taken into account.

The vertical dimension is referred with Z, whereas X and Y togetherdefine a horizontal two-dimensional point (X, Y). In FIG. 1, the arrowstarting at a point (X1, Y1) and ending at a point (X2, Y2) may be seenas a path 102 traversed by a user associated with an EMF positioningdevice. The Z dimension is omitted for simplicity. The positioningdevice is detailed later, but for now it may be said, that thepositioning device may comprise a magnetometer or any other sensorcapable of measuring the EMF, such as a Hall sensor or a digitalcompass. The magnetometer may comprise at least one orthogonal measuringaxis. However, in an embodiment, the magnetometer may comprisethree-dimensional measuring capabilities. Yet in one embodiment, themagnetometer may be a group magnetometer, or a magnetometer array whichprovides magnetic field observation simultaneously from multiplelocations spaced apart. The magnetometer may be highly accurate sensorand even small variations in the EMF may be noticed. In addition to thestrength, also known as magnitude, intensity or density, of the magneticfield (flux), the magnetometer may be capable of determining athree-dimensional direction of a measured EMF vector. To this end, itshould be noted that at any location, the Earth's magnetic field can berepresented by a three-dimensional vector. Let us assume that a compassneedle is tied at one end to a string such that the needle may rotate inany direction. The direction the needle points, is the direction of theEarth's magnetic field vector.

As said, the magnetometer carried by a person in the device traversingthe path 102 in FIG. 1 is capable of determining the three-dimensionalmagnetic field vector. Example three components of the EMF vector aswell as the total strength are shown in FIG. 2A throughout the path 102from (X1, Y1) to (X2, Y2). The solid line 200 may represent the totalstrength of the magnetic field vector and the three other lines 202 to206 may represent the three component of the three dimensional magneticfield vector. For example, the dot-dashed line 202 may represent the Zcomponent (vertical component), the dotted line 204 may represent the Xcomponent, and the dashed line 206 may represent the Y component. Fromthis information, the magnitude and direction of the measured magneticfield vector may be extracted. FIG. 2B shows how the Earth's magneticfield 208 may be present at the location of an object 210. In FIG. 2B,the object 210 is oriented in the three-dimensional space (XYZ)according to the frame of reference of the building. However, typicallythe object is moving and the three-dimensional orientation of the object210 may vary from the frame of reference of the building as shown inFIG. 2C. In this case, the three-dimensional frame of reference is notfor the building but for the object 210, such as for the positioningdevice. Such frame of reference may be denoted with X′, Y′, and Z′corresponding to rotated X, Y, and Z of the world coordinate system. TheG vector in FIG. 2C denotes the gravitational force experienced by theobject 210.

In location tracking of the positioning device or any target objectmoving in the building 100, the EMF vector measured by the positioningdevice carried by the user may be compared to existing information,wherein the information may comprise EMF vector strength and directionin several locations within the building 100 or within a plurality ofbuildings. The information may thus depict an indoor Earth's magneticfield map. The map may cover one building or many buildings. Thepositioning device of the user may comprise at least part of the EMFmap, the positioning device may access the EMF map stored somewhere elsein a network accessible by the positioning device, or the positioningdevice may forward the measured EMF vector data to a database entity orserver which comprises or has access to the EMF map and thus is capableto locate the user in the building. Preferably but not necessarily, theEMF map covers most or all of the building(s) so that the user may bereliably located without “black spots”.

As said the positioning device may acquire the EMF vector by performingmeasurements with the in-built magnetometer, for example. However, theamount of data in the EMF map may be vast. Therefore, the utilization ofthe EMF map may be problematic, time-consuming and computationallydemanding. In order to at least partially solve the above mentioneddrawbacks, it is proposed, as shown in FIGS. 3 and 4, that thepositioning device (PD) 400 or the database entity (DBE) 500 acquires,in step 300, a location estimate 402 of the PD 400 that is to determineits location inside the building 100. The location estimate 402 isacquired on the basis of an indoor non-magnetic field (NMF) basedlocation discovery system. As the name implies, the location estimatemay be only an estimate: it may not accurately represent the exactlocation of the PD 400 but only give an estimation of the PD's 400location. This may be because the indoor NMF based location discoverysystem may not be as accurate as the EMF based discovery. Alternatively,the estimate is accurate, but lacks efficiency otherwise, as will bedescribed. As will be described later, the location estimate 402 may beused to improve the efficiency of EMF based location discovery, forexample.

The location estimate 402 may cover a single continuous area or zonewithin the map, such as one building, one floor, one room, or one partof a floor, etc. However, in another embodiment, the location estimatecovers several floors or rooms, etc. In yet one embodiment, the locationestimate may comprise two or more separate areas (i.e. not only onecontinuous area) within the map. For example, the location of the PD 400may be estimated to be in the room A of the floor N, or in the room C ofthe floor N+1. These two rooms may form two separate parts of thebuilding.

The indoor NMF based location discovery system, which is used as a basisfor the location estimate 402, may be in an embodiment one of thefollowing: an indoor radio frequency base station based locationdiscovery system, a system comprising at least one camera image, asystem applying Bluetooth, a system applying radio frequencyidentification, a system comprising an air pressure sensor. Further, asystem comprising an odometer and/or an inertial measurement unit may beused as an additional location discovery means. For example, if thebuilding is equipped with another location discovery system, such as forexample the indoor base station based location discovery, theinformation provided by that other location technique may be used. Suchadditional data may obtained by an RF based location tracking unit ofthe PD 400, transmitted to the DBE 500 and processed in the DBE 500, forexample. The information stored relating to the other non-magnetic basednavigation system may comprise the mounting location of the indoor basestations, radio maps comprising RF signal strength values at differentlocation, a map of atmospheric pressure sensor values at severallocations, for example.

As an example, it may be said that the indoor radio frequency (RF) basestation based location discovery system may apply a wireless local areanetwork (WLAN, WiFi). The location estimate 402 may be obtained by thePD 400 by measuring the received signal strength indicators (RSSI) fromthe WLAN signals from WLAN base stations, such as a beacon from the basestation 404, for example. Alternatively a round trip time, direction orarrival, or any other discovery technique applying RF base stations 404indoors which is known to a skilled person, may be used. Alternativelyor in addition to, other discovery means may be applied, such asodometers, inertial measurement units, air pressure sensors, cameraimages, Bluetooth, radio frequency identification (RFID).

In an embodiment, the indoor radio frequency (RF) base station basedlocation discovery system may apply a cellular network. That is,cellular network base stations, possibly locating outdoors, may be usedto acquire the location estimate of the PD 400. Such use of cellularnetwork may efficiently help in locating the PD 400 at least within oneor more buildings, but in some cases also more accurately within a fewfloors of one building. The PD 400 may be equipped with a circuitry formeasuring the received signal strength of one or more cellular basestations so as to enable triangulation, for example. The cellularnetwork may apply at least one of the following radio accesstechnologies (RATS): Worldwide Interoperability for Microwave Access(WiMAX), Global System for Mobile communications (GSM, 2G), GSM EDGEradio access Network (GERAN), General Packet Radio Service (GRPS),Universal Mobile Telecommunication System (UMTS, 3G) based onwideband-code division multiple access (W-CDMA), high-speed packetaccess (HSPA), long term evolution (LTE), and/or LIE-advanced.

In an embodiment, the location estimate may be obtained on the basis ofat least one image captured by the PD 400 and compared to a database ofimages representing the control points. The image may have been capturedwhen the three-dimensional orientation of the PD 400 is according topredetermined rules. The database of images may reside in the memory ofthe PD 400 or of the database entity 500. In the latter case, either thedatabase of images is accessible by the PD 400 or the images captured bythe PD 400 are transmitted to the database entity 500 for review.

In an embodiment, the indoor location estimate of the PD 400 may beidentified on the basis of the NMF based location discovery, wherein theNMF based location discovery applies a low range data transfer performedby the PD 400. The low range data transfer applies at least one of thefollowing: a radio frequency identification (RFID) technique, aBluetooth communication protocol, a machine readable bar code, a IEEE802.15.4 communication protocol. The PD 400 may be equipped withsuitable hardware and software (a low range communication unit) whichallows the PD 400 to communicate through the low range communication.For this reason, there may be another low range communication unitmounted at a predetermined location, such as close to the entry point ofthe building, for example. As the predetermined location of the mountedunit is known, the initialization of the PD 400 with the identifiedlocation estimate may be performed. For example, the location may bestored in the memory operatively coupled to the mounted unit in order toinitialize the PD 400 with the indoor location estimate corresponding tothe identified location (i.e. the predetermined location of the mountedlow range communication unit). The mounted low range communication unitmay provide communication properties in such a low range that it may beassumed that the PD 400, when communicatively coupled to the mounted lowrange communication unit, is in the same physical location as themounted low range communication unit. This may allow for fastconvergence of the location estimation of the PD 400.

For example, let us assume that the mounted low range communication unitis the first RFID unit. Then, the PD 400 comprising a second RFID unitmay read information comprised in the first RFID unit. The informationmay comprise the location of the first RFID unit, for example. Based onthis information, the PD 400 may initialize its location estimate. ThePD 400 may also activate the indoor navigation system, if not alreadyactivated. The information may be comprised in the memory coupled to thefirst RFID unit, or the first RFID unit may provide access informationto a network element where the information is stored. Alternatively, thefirst RFID unit may read information from the second RFID unit 476 ofthe PD 400, wherein the information may comprise network access addressof the PD 400. Then network access equipment couple to the first RFIDunit may cause the initialization of the PD 400 with the locationestimate and possibly with the EMF map data through the network. Ineither case, the data may also provide information enabling a networkaccess establishment between the PD 400 and a network element, such asthe database entity 500. The information may include network address ofthe PD 400 and/or the network address of the network element, such asthe database entity 500.

Some of these techniques, such as the RFID based technique, may be veryaccurate in determination of the PD 400 location in the area. However,the RFID may have a poor performance for the tracking of the personcarrying the PD 400, for example. For this, the odometers or inertialmeasurements may provide guidance, but the accuracy of such locationtracking may not be as good as desired. However, for the sake ofsimplicity, let us consider that the indoor NMF based location discoverysystem is the indoor RF base station based location discovery systemapplying the WLAN.

In order to acquire the location estimate, the PD 400 may need toperform some measurements, such as the RSSI measurements. As shown inFIG. 4A, the PD may have received a WLAN signal from the WLAN basestation 404. Based on the detected signal strength and the knowledge ofthe location of the base station 404, the location of the PD 400 may beestimated to be in the vicinity of the base station 404, as shown withthe curve 402. The location estimate of the PD 400 may be determined bythe position device 400 itself or by a database entity 500 to whichlocation related information from the PD 400 is sent via a wirelessinterface, as will be described later.

In step 302, the PD 400 or the DBE 500 accesses the indoor EMF map of aplurality of buildings, possibly including the building 100. As said,the indoor EMF map represents at least one of magnitude and direction ofthe earth's magnetic field 208 affected by the local structures of thebuilding 100. The EMF map may be generated on the basis of a pluralityof EMF measurements performed by one or more mapping devices, whichmeasure the EMF vectors at several locations in one or more buildings.Any person may contribute in the generation of the magnetic field mapfor indoors. Such crowd sourcing approach may provide an efficientmanner in acquiring the EMF map for a large number of buildings. Anyperson may apply a measuring device, or a mapping device, in order tomeasure the EMF vectors indoors and thus contribute in generation of EMFmap. The measuring device applied by each person may be his/her mobilephone or any mobile device. This may be possible as today's mobiledevices may be equipped with a magnetometer and radio interfacecomponents, for example. The mapper may measure the EMF vector in acertain location/path and provide the measured data to a centraldatabase entity, for example. The measured at least one of magnitude anddirection of the earth's magnetic field 208 may be recorded in the mapfor each location. In an embodiment the PD 400 stores the EMF map in itsmemory. In an embodiment, it may be that the DBE 500 stores the map. Inan embodiment, alternatively, it may be that the EMF map is storedsomewhere in the network and the corresponding device 400/500 haswireless access to the information comprised in the EMF map.

Let us assume that the block 406 in FIG. 4B represent an area for whichthe map has been generated. The area 406 may comprise a plurality ofbuildings, for example. Let us further assume that the table 408represents the EMF map for the area 406. Now the acquired locationestimate 402 may be used to narrow the area in which the PD 400 iscurrently present.

For example, when the indoor EMF based positioning system appliesmulti-hypothesis location estimation, the number of different hypothesismay in the beginning include over 1000 location hypothesis for the PD400. Therefore, it may be understood that it may take a lot of time toconverge to the correct hypothesis. By enabling the initial locationestimate, the efficiency of the location discovery is increased as thenumber of location hypothesis may be reduced closer to the identifiedlocation estimate. Thus, the time of convergence to the correct locationmay be reduced.

Thereafter, in step 304, the device 400 or 500 may select a part 410 ofthe indoor EMF map 408 on the basis of the acquired location estimate402 of the PD 400, wherein the selected part 410 of the indoor EMF map408 includes the indoor EMF map for the area in which the PD 400currently is, that is, for the area corresponding to the locationestimate 402. This selected area may be a building, a floor of amulti-story building, a part or a room of one floor, etc. Alternativelythe selected part 410 may comprise two separate subparts of the map 408,such as a map part covering the room A of the floor N and a map partcovering the room C of the floor N+1. In an embodiment, the selectedpart covers the entire EMF map 408. This may be the case when thelocation estimate 402 does not provide very accurate estimate of thelocation. In another embodiment, the selected part 410 is smaller thanthe entire map EMF 408. This may be a more typical case in which thelocation estimate 402 implies the location of the PD 400 with somerelatively good accuracy, such as within one building, within a fewfloors or within a few rooms. In such case the other improbablelocations covered with the EMF map 408 may be disregarded and only arelatively small part 410 covering the probable locations of the PD 400is processes further. There may be predefined rules on how large onepart is. For example, if it is detected that the PD 400 is in a certainbuilding, the part of the map may cover the whole building. In case itis determined that the PD 400 in is a certain floor, the part of the mapmay cover the whole building where the floor is, only the floor, or onlya part (such as a room) of the floor. FIG. 4B shows the selected part410 of the EMF map 408 with a part having right leaning diagonal lines,for example. It may be advantageous to select such part 410 of the EMFmap 408 because then the search space used for the EMF based locationdiscovery is narrowed to cover only the selected part 410, not the wholemap 408. This may provide advantages in computational efficiency, datatransfer efficiency, as will be described.

Further, this may enable the location of the PD 400 (and the personcarrying the PD 400) to be detected fast. For example, assume a personneeds to be located in a building in case of emergency. Such techniquemay be needed in an enhanced 911 (E-911), which is a location technologyadvanced by the federal communication commission (FCC) that may enablemobile, or cellular, phones to process 911 emergency calls and enableemergency services to locate the geographic position of the caller. Now,according to the proposed scenario, the location estimate is firstobtained by applying the NMF based location discovery techniques, suchas WLAN base stations, cellular base stations, Bluetooth, etc. Thelocation estimate may be used to narrow down the search space for theto-be-applied EMF based location discovery (e.g. selecting the part 410of the EMF map 408 instead the whole EMF map 408). By doing this, theEMF based location discovery may converge faster to the correct locationhypothesis. Thereafter, more accurate location discovery and/or possiblytracking of the user with the PD 400 may be conducted with at least theEMF based location discovery. This may help in saving time when thelocation of the person in emergency need to be determined as fast aspossible

For example, let us assume that there is a plurality of buildings A, B,C in the area 406. Assuming the indoor NMF based location discoveryapplies the WLAN base stations, it may be that there is a WLAN basestation present in each building A, B, C, or only in some buildings. Inthe depicted example case, the PD 400 may receive the strongest WLANsignal (a beacon, for example) from the closest base station, i.e. thebase station present in the building B. Therefore, in an embodiment, thecorresponding device 400 or 500, may identify, on the basis of theacquired location estimate 402, the building B, among the plurality ofbuildings A, B, C, to be the building in which the PD 400 currently is.In this case the selected part 410 of the indoor EMF map 408 may includethe indoor EMF map for the identified building B. The selected part 410may not comprise EMF map coverage for any other building. The PD 400 mayselect the part 410 in case it has access to the map 408 and hasestimated the location of itself. In another embodiment, the DBE 500 mayselect the part 410 in case it has access to the map 408 and hasacquired (received or determined) the location of the PD 400.

In another embodiment, let us assume that the building 100 is amulti-story building, that is, there may be a plurality of floors D, E,F in the building 100, as shown in FIG. 5B. Assuming the indoor NMFbased location discovery applies the WLAN base stations, it may be thatthere is WLAN base station present in each floor or only in some floors.Consequently, the PD 400 may receive the strongest WLAN signal from thebase station present in the floor in which the PD 400 currently is. Asanother or additional embodiment, an air pressure sensor of the PD 400may be used to indicate the floor in which the PD 400 currently islocated. The measured value of the PD 400 may indicate the altitude ofthe PD 400. As the typical room height is known, the air pressure sensormeasurement result may be used to indicate, approximately, the floor inwhich the PD 400 is located.

For example, assume a scenario where a person carrying the PD 400 takesthe elevator. When the person arrives in the floor of destination andexits the elevator, it may be advantageous to go back to accurate EMFbased location tracking as early as possible. However, the part of thejourney travelled in the elevator may have caused the EMF based locationdiscovery system to lose track of the person. Therefore, as the personexits the elevator in a floor N, for example, the location discovery maybe able to immediately know that the current floor is the floor N.Consequently, it may need to locate the person by applying a vast numberof initial location hypotheses, possibly covering several floors. Thismay take some time. However, providing a location estimate, for exampleon the basis of the non-magnetic field WLAN base station aided locationdiscovery, may help the EMF based location discovery to convergentfaster. This is because the location hypothesis in floors or rooms notcorresponding to the location estimate may be discarded.

Therefore, in an embodiment, the corresponding device, either the PD 400or the DBE 500, may identify, on the basis of the acquired locationestimate 402, that the PD 400 currently is in the floor E of themulti-story building 100. The selected part 410 of the indoor EMF map408 may then include the indoor EMF map for the identified floor E ofthe multi-story building 100. The selected part 410 may not comprise EMFmap coverage for any other floor. The PD 400 may select the part 410 incase it has access to the map 408 and has estimated the location ofitself. In another embodiment, the DBE 500 may select the part 410 incase it has access to the map 408 and has acquired (received ordetermined) the location of the PD 400.

In yet one embodiment, the corresponding device, either the PD 400 orthe DBE 500, may identify, on the basis of the acquired locationestimate 402 that the PD 400 is currently within a predetermined numberof floors. The predetermined number may depend on what type ofmeasurement results are used for the location estimation. For example,when WLAN base stations are used, it may be accurate enough to limit thelocation of the PD 400 within three adjacent floors D, E and F of thebuilding 100. It should be noted that there may be, for example, tens offloors in one building 100. The reason for narrowing the floors to threemay be that a certain base station located in the floor N may, with ahigh probability, provide the strongest signal, among all the WLAN basestation signals in the building 100, to the floor N, to the floor N−1 orto the floor N+1. For example, there may be obstacles in the airinterface between the base station located in the floor N and the PD400. In this case, the base station in the floor N−1 or N+1 may providea stronger signal to the PD 400 in the floor N, which may lead thelocation estimate to imply that the PD 400 is in the floor N−1 or N+1.In case, the WLAN signal measurements result in acquiring the strongestsignal from the floor N−1, then the candidate three floors may be N−2,N−1, and N. By limiting the floors to three adjacent floors may bebeneficial in that the correct floor (i.e. the floor N) is among thecandidate floors. When applying the air pressure sensor, or a barometer,for implying the floor in which the PD 400 is located, the predeterminednumber of candidate floors may be larger, for example. Thereafter, theselected part of the EMF map may be a part which comprises a map partcovering the predetermined number of adjacent floors (such as the floorsN, N+1, N−1) of the building 100. The selected part 410 may not compriseEMF map coverage for any other floor. The PD 400 may select the part 410in case it has access to the map 408 and has estimated the location ofitself. In another embodiment, the DBE 500 may select the part 410 incase it has access to the map 408 and has acquired (received ordetermined) the location of the PD 400.

In an embodiment, the topology and/or layout of the relevant building,in which the PD is estimated to be currently located, is taken intoaccount in defining the location estimate further. In other words, thelayout of the rooms, halls, elevators, walls, may be taken into accountwhen limiting or adjusting the area in which the PD 400 currently is.Topologies and/or layouts of the buildings may be known and storedbeforehand in the PD 400 or in the DBE 500. For example, it may be thatthe location estimate indicates that the PD 400 is in floor N of thebuilding. However, it may be that there is an elevator shaft, a publiclyrestricted or secured zone, etc. within that floor N. Based on thisknowledge, the location estimate, otherwise covering the whole floor N,may be narrowed or limited by excluding those improbable areas from themap of the floor N. Such further defining of the location estimate 402may aid in selecting a smaller part 410 of the EMF map 408, which mayconsequently lead in more efficient EMF based location discovery.

In an embodiment, the adjusting or defining the location estimatefurther may denote decreasing the area covered by the location estimate.In another embodiment, the adjusting or defining the location estimatefurther may denote enlarging the area covered by the location estimate.This may be the case, for example, when it is known that the entry tothe stairway in the building is open and wide. Then, for example, WLANsignal may reach the PD 400 located in the stairway. In such case, thelocation estimate may be adjusted to cover the stairway as well.

In an embodiment, an identifier of the PD 400 is detected. This mayimply that the PD 400 is or is not carried by, for example, an employerworking in the building. This may be taken into account when furtherdefining the location estimate of the PD 400. For example, let usimagine that there is a floor with three rooms, out of which onerequires authorized access. It may be that only a staff member (e.g. anemployer or an employee) is allowed to enter to the room. E.g. there maybe a code needed for the entry. Now, if the person carrying the PD 400does not belong to the staff of the company, on the basis of thedetected identifier of the PD 400 and a staff or device database of thecompany, then some restricted areas may be excluded from the possiblelocations of the PD 400. Such further defining of the location estimate402 may aid in selecting a smaller part 410 of the EMF map 408, whichmay consequently lead in more efficient EMF based location discovery.

Let us now take a look at different options regarding the roles of thePD 400 and the DBE 500. In an embodiment, as shown in FIG. 6A, the PD400 may process the measurement result by itself in order to roughlylocate itself in step 600. Then, in step 602, the PD 400 may itselfaccess the map by selecting the part 410 of the EMF map 408, asexplained above. This may be the case when the PD 100 itself stores orhas access to the EMF map 408. Thereafter, in step 604, the PD 400 mayapply the selected map part 410 in an EMF map based locationdetermination. This step may comprise the DP 400 performing EMF vectormeasurements (magnitude and/or direction of the EMF vectors) with amagnetometer, for example, and comparing the measured EMF vector valuesto the selected EMF map part 410 in order to determine the location ofthe PD 400. As said, a multi-hypothesis location discovery may be used.The EMF map based location discovery may provide more accurate resultsthan the rough WLAN location discovery. Further, it may allow themovements of the PD 400 to be tracked throughout the building 100whereas, for example, RFID based location discovery may not be able todo so. It may be beneficial to use only part of the map as then theamount of data processed by the PD 400 is smaller. That is, the searchspace is limited to the selected part 410 of the EMF map 408, instead ofgoing through the whole EMF map 408 which may comprise data for severalbuildings and for several floors, for example.

In some embodiments, as shown in FIGS. 6B, 6C and 6D, it is the DBE 500which stores or accesses the EMF map 408. In FIG. 6B, the PD 400 maydetermine the location estimate as described in step 600 and transmitthe location estimate, in step 606, to the DBE 500, which in this wayacquires the location estimate of the PD 400. Thereafter, the DBE 500having access to the EMF map 408 may select the map part 410 whichcorresponds to the location estimate in step 608. For example, if thelocation estimate implies that the PD 400 is in the building B, then theDBE 500 may select the part 410 which comprises only the building B, notbuildings A and B. In step 610 the DBE 500 may transmit the selectedpart 410 of the EMF map 408 to the PD 400 in order to allow the PD 400to apply the part 410 in the EMF map based location determination instep 604.

In yet one embodiment, as shown in FIG. 6C, the PD 400 may perform therequired NMF based detections/measurements in step 612. Thereafter,instead of determining the location estimate of the PD 400 itself, thePD 400 may in step 614 transmit the detection/measurement results to theDBE 500. Then, the DBE 500 may in step 616 determine the locationestimate of the PD 400 on the basis of the received measurement results,and in this way acquire the location estimate of the PD 400. Forexample, the measurement results may indicate the RSSIs from differentWLAN base stations, air pressure sensor measurements for implying thelocation in the vertical direction (such as floors), camera images,and/or RFID detections. Thereafter, having obtained the knowledge of thelocation estimate of the PD 400, the DBE 500 may in step 608 select themap part 410, as earlier described. Further, in step 610 the DBE 500 maytransmit the selected part 410 of the EMF map 408 to the PD 400 in orderto allow the PD 400 to apply the part 410 in the EMF map based locationdetermination in step 604.

In case of FIGS. 6B and 6C, it may be understood that selecting only apart 410 of the map 408 to transmit to the PD 400 is efficient from thepoint of view of channel capacity, delays, resource usage, for example.For example, the PD 400 acquires the relevant map part 410 to its usefaster than in the case where the whole map 408 (of the building 100 ormany buildings, for example) is exchanged from the DBE 500 to the PD400. Further, the computational complexity of the PD 400 is reduces asit need not handle the whole map 408 but only a small part of the map.For example, it may be that the PD 400 executes a software applicationwhich needs to locate the PD 400 in order to perform itsfunctionalities. In this case, the application may cause the PD 400 totrigger the NMF based location discovery, such as the RSSI measurementprocess. Such application may be so called location-aware applications,such as the Foursquare, etc.

The transmission of the selected map part 410 to the PD 400 in FIGS. 6Band 6C may be dependent on a request from the PD 400. That is, the DBE500 may provide, on request, the selected part 410 of the indoor EMF map408 to the PD 400 in order to allow the PD 400 to use the selected part410 of the EMF map 408 in locating itself. The request may be anexplicit request to transmit the part 410 of the map 408, or thetransmission of the location estimate or the measurements result may beseen as an implicit request to execute the step of transmitting the part410 to the PD 400. In other words, an indoor navigation circuitry of theDBE 500 may provide, on request, at least part 410 of the generatedindoor magnetic field map 408 to the PD 400 that is to determine itslocation inside the building 100 to which the EMF map is applicable. Theindoor navigation circuitry may provide the entire EMF map of thebuilding 100 to the PD 400 via network. Alternatively, the indoornavigation circuitry may provide only a part 410 of the EMF map 408 tothe positioning device 400, wherein the part 410 of the generated indoorEMF map 408 to provide is selected on the basis of location estimate 402of the positioning device 400. By knowing the location of the PD 400, atleast roughly, the indoor navigation circuitry may then provide EMF maponly for the area where the PD 400 is currently moving, such as for thefloor of the building where the PD 400 currently is. This may beadvantageous so that only a part 410 of the large EMF map 408 needs tobe communicated to the positioning device 400. The PD 400 may then usethe map or part of the map in locating itself in the building 100. Theindoor navigation circuitry may also be responsible for identifying thecorrect position in the building 100 and to cause initialization of thePD 400 with the location estimate and/or with the at least part 410 ofthe EMF map 408.

In yet one embodiment, as illustrated in FIG. 6D, the steps 612, 614,616 and 608 are as they were in the case of FIG. 6C. However, instead oftransmitting the selected part 410 to the PD 400, the PD 400 performsEMF vector measurements in step 618 and transmits the measurementresults or information indicating the measured EMF vector (magnitudeand/or direction) to the DBE 500 in step 620. The DP 400 may perform theEMF vector measurements and transmissions automatically or based on arequest from the database entity 500. Thereafter, as the DBE 500receives at least one measured magnetic field vector value (such asmagnitude and/or direction) from the PD 400, the DBE 500 may in step 622determine the location of the PD 400 on the basis of the received atleast one measured magnetic field vector value and the selected part 410of the indoor EMF map 408. This step 622 may comprise comparison of thereceived EMF vector value to the EMF vector values comprised in theselected map part 410 in order to determine the location of the PD 400in the selected map area. As may be understood by a skilled person, itmay be beneficial to perform the comparison to only a part 410 of themap instead of the whole map 408 from the point of view of computationalefficiency and latency. Finally, in step 624, the DBE 500 may indicatethe determined location of the PD 400 to the PD 400 in step 624. In thisembodiment, the PD 400 need not itself determine its location, but itreceives the accurate, EMF map based, location indication from the DBE500. Thus, the operation of the PD 400 is simplified. This may be veryadvantageous considering the limited computational resources of themobile PD 400 compared to the server-type functionalities of the DBE500.

In an embodiment, as shown in FIGS. 7A and 7B, the device 400 or 500may, after acquiring the location estimate 402 of the PD 400 in step700, determine probabilities for possible locations of the PD 400 on thebasis of the acquired location estimate 402 in step 702. For example, asindicated in some examples, the NMF based measurement results may implywith a high probability that the PD 400 is within certain floors of thebuilding 100 or within a certain building, or in a certain area, such asa room, of the building 100. For example, it may be that the airpressure sensor or the RSSI detection may imply that the PD 400 is infloor N. Then, the location probability of the PD 400 may be higher inthe floor N than in the floors above or below the floor N. The locationprobability for the PD 400 being in a floor N−1 may be higher than thelocation probability for the PD 400 being in a floor N−2, and so on.

As a further example, let us look at FIG. 7B which depicts the area 406corresponding to the whole map 408. As said, the area 406 may be abuilding, a floor a part of a floor, etc. A location estimate 402 of thePD 400 has been acquired and it is shown with the dotted curve in FIG.7B. The degree of the location probability of the PD 400, based on thelocation estimate 402, is represented with the radius or size of theellipses 710 in the Figure. As may be seen, the location hypothesis forthe locations in the area 406 which are far from the location implied bythe location estimate 402 are given lower probabilities and the locationhypothesis for the locations in the area 406 which are close to thelocation implied by the location estimate 402 are given higherprobabilities. The probabilities may decrease linearly or exponentiallyas the distance for the location hypothesis for the PD 400 grows fromthe location estimate 402. Advantageously the device (either the PD 400or the DBE 500) may then in step 704 limit or modify the search spacefor the indoor EMF map-based location determination of the PD 400 on thebasis of the determined probabilities.

In an embodiment, limiting the search space may comprise, in step 706,applying a probability distribution in the indoor EMF map-based locationdetermination of the positioning device 400, wherein the probabilitydistribution emphasizes those locations which are most probablelocations of the PD 400 according to the determined probabilities. As aconsequence, the areas with low probability are not checked first or aregiven lower weights/importance in the indoor EMF map-based locationdiscovery.

The probability distribution may be applied also for the selected part410 of the EMF map 408 or for the whole map 408. In an embodiment, thecorresponding apparatus 400 or 500 selects the part 410 from the EMF map408 on the basis of the location estimate 402 and the determinedprobabilities. Thus, not only the location estimate 402 is used but alsothe probability distribution is used. This may provide more accurateselection of the part 410. For example, the determined probabilities mayimply that a larger part (possibly including many rooms or floors) is tobe selected even though the location estimate implies that the PD 400 isin one room or in one floor, respectively.

In one embodiment, the corresponding device 400 or 500 applies theprobability distribution to the selected part 410 of the EMF map 408.This embodiment may provide faster convergence to the correct hypothesisthan in a case where no probability distribution is applied.

In an embodiment, the DBE 500 may use the determined probabilities inthe EMF based location discovery. In another embodiment, the PD 400 mayuse the determined probabilities in the EMF based location discovery. Inthis embodiment, it may be that the DBE 500 determines the probabilitiesand transmits the probabilities or probability distribution to the PD400.

In an embodiment, as shown in FIG. 8A, the either the PD 400 (as inFIGS. 6A-6C) or the DBE 500 (as in FIG. 6D) may in step 800 detect thecurrent location of the PD 400. This may take place by applying locationhypothesis to the whole or selected EMF map part 410 on the basis of isEMF vector measurements performed by the PD 400, for example. As thecurrent location is accurately known on the basis of the EMF map basedlocation discovery, the PD 400 may measure at least one measurementparameter value related to the indoor NMF based location discoverysystem at the detected current location of the PD 400. In case theindoor NMF based location discovery system is the RF base station baseddiscovery system, the at least one measurement parameter value may bethe values of the RSSIs of WLAN base stations, for example. In case theindoor NMF based location discovery system applies air pressure sensors,the at least one measurement parameter value may be the atmosphericpressure in the location as measured by the air pressure sensor of thePD 400. In an embodiment, the PD 400 may then transmit the at least onemeasurement parameter value to the DBE 500. In any case the device400/500 acquires the at least one measurement parameter value related tothe indoor NMF based location discovery system at the detected currentlocation of the PD 400 in step 802. As this value is acquired, thecorresponding device 400/500 may in step 804 apply the acquired at leastone value for an update of a map of the indoor NMF based locationdiscovery system. For example, when the value is the RSSI of the WLANbase stations, the update may comprise updating the current value of theradio map with the acquired value. The current value may not representthe current situation in the building because, for example, furnituremay have been added or moved since the last RSSI measurement. In thisway the role of the indoor NMF based location discovery system may betwo-fold: firstly it may be used to provide the (rough) locationestimate of the PD 400 and secondly, once the accurate location is knownon the basis of the EMF map based discovery, the NMF based locationdiscovery system may be updated.

It should be noted that the PD 400 may have moved from the areacorresponding to the location estimate 402. In an embodiment, thelocation estimate 402 is used only for initialization of the EMF basedlocation discovery after which the moving PD 400 may have moved awayfrom the location area. The accurate location of the PD 400 maynevertheless be accurately tracked even on move by applying the EMFbased location estimation. In another embodiment, the NMF based locationdiscovery, such as the WLAN tracking, is used also later on during themovement of the PD 400. In such case, the PD 400 may measure both, theEMF vectors and the RSSIs of the WLAN base stations, and apply bothmeasurements in the location discovery.

One example of the update is shown in FIG. 8B, in which the locationestimate on the basis of the NMF based location discovery is acquired instep 810. In steps 812 and 814 the DBE 500 (in this example embodiment)selects the EMF map part 410 and applies the part 410 and EMFmeasurements results from the PD 400 in the EMF based locationdiscovery.

This EMF map based location discovery may provide accurate location ofthe PD 400 so that the current location of the PD 400 may be known, eventhough the PD is moving or has moved away from the initial locationestimation. Thereafter in step 816, the PD 400 may transmit the at leastone measurement parameter value related to the indoor NMF based locationdiscovery system at the detected current location to the DBE 500. The PD400 may be requested to do so, or the PD 400 may do so automatically. Instep 818, the DBE 500 may then cause an update of the indoor NMF map,such as the update of a radio map comprising RSSIs at each location.This may provide an efficient means to keep the NMF based mapup-to-date.

An actuation of a predetermined software function in or with respect tothe PD 400 may be automatically caused when it is detected that the PD400 is in a certain location. The database entity 500 may cause theactivation by sending a command to the PD 400, or the PD 400 may causethe activation itself. Such a predetermined software function maycomprise for example a navigation system. For example, when it isdetected that the PD 400 is in an area in which WLAN base station signalis or should be present (on the basis of the current radio map, forexample), the PD 400 may be requested to provide, or provide withoutrequest, current RSSI value(s) in that area so as to enable the radiomap update. One example scenario is that the location estimate isacquired by applying an RFID technique. Then the PD 400 may move awayfrom the presence of the RFID spot. The location of the PD 400 may benevertheless tracked by applying the EMF based location discovery. Whenthe detected current location of the PD 400 (on the basis of the EMFbased tracking) is such where WLAN base station based indoor locationtracking is available, the PD 400 may then provide or be requested toprovide the RSSI values in the area for the update of eh radio map. Itshould be noted that the DBE 500, for example, may be aware of the radiomaps of the buildings.

In another embodiment, such a predetermined software function maycomprise for example a reference to a social network. For example, sucha reference may be a check-in to the Facebook Places, Foursquare socialnetwork, a status update to the Facebook, or to the Twitter, wherein thestatus update refers to the location of the user associated with the PD400, for example. In other words, when it is detected that theoperational environment has changed, for example, from outdoors toindoors, the PD 400 may automatically check-in to the Foursquare. Thismay be advantageous for the user so that the user need not himselfperform the reference to the social network.

Further, in an embodiment, the entry of the building among a pluralityof entries may be detected. This may further aid in specifying thecheck-in location of the user to the building so that the check-inlocation may correspond to the specific entry of the building. Knowingthe exact location of entry in to the building 100, may serve as atrigger to cause the initialization of the PD 400 with at least part ofthe EMF map of the building 100, wherein the part of the EMF mapcomprises at least the location of entry. That is, the locationestimation may cover the area in which the entry to the building is.Such detection of entry may be performed on the basis of the NMF basedlocation detection, such as an RFID or Bluetooth, for example.

As said, after the location estimate has been utilized in initializingthe EMF-based location discovery, the tracking of the PD 400 may takeplace by applying the EMF vector measurements and the EMF map 408. Itshould be noted that the EMF map 408 may comprise vector values (such asmagnitude and direction) which correspond to values (such as direction)when the PD 400 is kept in a predetermined three-dimensionalorientation. However, a person carrying the PD 400 may not all the timekeep the PD 400 in correct angles with respect to the frame of referenceof the building 100 represented with XYZ coordinates. In particular, thePD 400 may be rotated about at least one of the three axis X, Y and Z,as shown in FIG. 2C. This may lead to inaccurate EMF measurements beingcarried out by the PD 400 with respect to the direction of the EMFvector being and, thus, lead to erroneous or inefficient locationdiscovery and/or tracking or to erroneous or non-optimal initiallocation estimate. It should be noted that although observing themagnitude may in some cases be sufficient for detecting the change ofthe operational environment and/or for the location estimation/tracking,observing the direction may provide additional accuracy and efficiency.This is because more information, including the direction, may beutilized.

Therefore, in an embodiment, information indicating thethree-dimensional orientation of the PD 400 may be acquired by the PD400 or by the database entity 500 at the at least one time instant whenthe EMF vector is measured, wherein the EMF vector is measured by the PD400 and defined in the frame of reference (X′, Y′, Z′) of the PD 400, asshown in FIG. 2C. However, (X′, Y′, Z′) is not the same as (X, Y, Z).Thus, error may occur without adjusting/rotating/correcting the acquiredEMF vector from the frame of reference (X′, Y′, Z″) of the PD 400 to theframe of reference (X, Y, Z) of the floor plan. The adjustment may bemade at least partly on the basis of the acquired information indicatingthe three-dimensional orientation (X′, Y′, Z′) of the PD 400.

The three-dimensional orientation of the PD 400 may be defined by atleast one of the following: a rotation with respect to a firsthorizontal axis (such as X-axis or Y-axis), a rotation with respect to asecond horizontal axis (such as Y-axis or X-axis, respectively), and arotation with respect to a vertical axis Z. Let us consider this in moredetail by referring to FIG. 9. In FIG. 9, the solid arrows represent theworld XYZ coordinate system and the dotted lines show the frame ofreference of the PD 400. FIG. 9A shows how the PD 400 may be rotatedabout Y-axis. In FIG. 9, the X direction represents the direction fromthe point (X1, Y1) to the point (X2, Y2) in FIG. 1, for example. Thatis, in FIG. 9A, the Y-axis points towards the paper. In FIG. 9B, the PD400 is rotated about X-axis, which points towards the paper. In order todetermine the amount of rotation about the Y-axis (FIG. 9A) and aboutX-axis (FIG. 9B), the PD may be in one embodiment equipped with inertialmeasurement unit (IMU). The IMU may comprise at least one accelerationsensor utilizing a gravitational field. The IMU may optionally alsocomprise other inertial sensors, such as at least one gyroscope, fordetecting angular velocities, for example. The acceleration sensor maybe capable of detecting the gravitational force G. By detecting theacceleration component G caused by the Earth's gravitation in FIGS. 9Aand 9B, the PD 400 may be able to determine the amount of rotation aboutaxis X and/or Y. In another embodiment, the IMU may detect the movementof the person carrying the PD 400. This may advantageously allow thespeed and direction of the person to be determined.

Although the rotation about the X and Y axis may in general becorrectable because the global reference (the gravitational force G) ispresent, the rotation about the Z-axis as shown in FIG. 9C may not becorrected as easily. This may be due to lack of the global referencesimilar to G. Rotations relative to the PD 400 may be detected by usingthe at least one gyroscope comprised in the IMU. However, the gyroscopemay not be able to follow the absolute rotation in the world coordinatesystem. In addition, the gyroscope may drift from the correctorientation due to gyroscope sensor inaccuracies such as sensor noiseand bias. However, for the correction about the Z axis, another globalreference may be used than the gravitational force G. Let us look atthis next.

Let us assume that the PD 400 measures EMF vectors at any given pointinside the building 100. Let us also assume that there exists an EMF mapfor the building 100, or at least for a part of the building 100. TheEMF map may indicate EMF vector magnitude and/or three-dimensionaldirection for a given location in the building 100 or in a part of thebuilding 100. As said, incorrect orientation of the PD 400 may lead toerroneous results or to a situation where only the magnitude of the EMFvector can be utilized but not the direction of the EMF vector inaddition to the magnitude of the EMF vector. Therefore it is beneficialto adjust the measured magnetic field vector from the frame of referenceof the PD 400 to the frame of reference of the floor plan the building100. This may be done at least partly on the basis of the knowledge ofthe direction of the true magnetic field vector F, as referred in FIG.9C, at the location where the PD 400 is assumed to be located (i.e. atthe location hypothesis of the PD 400). It should be noted that themeasured EMF vector may be defined in the frame of reference of the PD400 having an arbitrary three-dimensional orientation, thus possiblyleading to useless data with respect to the EMF vector direction. Thedirection of the true magnetic field vector for the at least oneposition hypothesis of the PD 400 may be determined on the basis of apredetermined EMF map at the at least one location corresponding to theat least one position hypothesis of the PD 400. The predetermined EMFmap may comprise position hypothesis outside the building and/or insidethe building. When correcting the measured EMF vector direction for a PD400 locating indoors, the predetermined EMF map may be the indoor EMFmap. When using multi-hypotheses location estimation, the number ofhypotheses in the beginning may be large, such as over 1000 hypotheses.However, by knowing the direction of references F and G at each of theplurality of position hypothesis, the three-dimensional orientation ofthe PD 400 may be adjusted to, or at least close to, the correct frameof reference.

For example, when there are two position hypotheses, thethree-dimensional orientation adjustment at the correct locationhypothesis performs better than at the false location hypothesis. Thisis because, when correcting the rotation based on Earth's gravitation G,the inclination of the measured EMF vector should approach the true EMFvector inclination F. If this is not the case, the position hypothesismay be determined as not correct or the probability of the reliabilityof the position hypothesis may be given a low value. This is because ata false position hypothesis, a wrong EMF vector direction F may be used.On the contrary, the orientation adjustment at the correct positionhypothesis based on G, makes the measured inclination and trueinclination F to be closer to each other. Then, the three-dimensionalorientation correction based on F may be conducted, i.e. thethree-dimensional orientation of the PD 400 with respect to the rotationabout the Z-axis may be corrected at least partly based on F. Thecorrection may be performed by the PD 400 or the database entity 500.Such three-dimensional orientation correction may be conducted evenoff-line if the PD 400 is equipped with the EMF map data. This way thethree-dimensional orientation of the PD 400 may be adjusted properly andcorrect values of EMF measurement vector may be obtained. Theorientation adjustment may allow efficient location estimation based ondirection of the EMF 208, in addition to or instead of the magnitude ofthe EMF 208.

However, in case the rotation about the z-axis cannot be corrected,which may be due to the lack of EMF map data (i.e. a global reference)for the location or location hypothesis of the PD 400, it may still beadvantageous to determine the magnitude of the XY-plane projection andthe magnitude of the Z-component. As said, the rotations about theXY-plane may be corrected using the global reference G. Namely, the normof the XY-plane projection ∥m∥_(xy) of the EMF vector m=(x, y, z) may bedetermined as ∥m∥_(xy) sqrt(x²+y²) even without adjusting the rotationabout the Z-axis. As a result, the feature vector (z, ∥m∥_(xy)) may becomputed from the tilt compensated magnetic field observation, whichfeature vector is invariant to the rotation about the Z-axis. These twofeatures enable for more EMF vector information than the magnitudealone, because the magnitude may be represented separately for theZ-axis component and for the XY-plane projection.

As explained, in an embodiment, the three-dimensional orientationcorrection at least partly based on the true magnetic field vectordirection F is performed for determining probabilities for positionhypotheses applied by multi-hypothesis location estimation. In thiscase, the orientation correction may be performed at each positionhypothesis. The multi-hypothesis location estimation may comprise 1)applying a motion model for at least part of the position hypothesesbased on the motion information, 2) orientation adjustment from theframe of reference of the PD 400 to the frame of reference of thebuilding 100 (or to another predetermined frame of reference), 3)comparing the measured, orientation adjusted EMF vector (or computedfeature vector) to the EMF vector (or computed feature vector) acquiredfrom the map at position hypothesis, 4) determining probability of beinga correct hypothesis for each position hypothesis on the basis of thecomparison and optionally also on the basis of the reliability of theorientation adjustment, and 5) updating a posteriori probabilitydistribution represented by the position hypotheses. Step 1-5 may berepeated without limit for a predetermined number of times, or as longas a certain threshold with respect to accuracy or characteristics of aposteriori probability distribution is met. At some point in time, theposition hypotheses close to the correct position may have highprobabilities, whereas the false positions may be associated with lowprobabilities (or lower probabilities). This way it may be determined,at each point of time, where the PD 400 is located in the building. Oncethe location estimates are converged, the tracking of the object, suchas the PD 400, may be started. The orientation correction using the mapdata as the global reference may advantageously allow themulti-hypothesis location estimation to converge faster to the correctposition/location hypothesis.

In an embodiment, the orientation correction is implemented, e.g., byapplying an orientation filter for MARG (Magnetic, Angular Rate, andGravity) sensor implementation in each position hypothesis. The MARGsensor contains a three-axis magnetometer, a three-axis angular ratesensor, and a three-axis accelerometer. The orientation filter can be,e.g., a quaternion, gradient decent, Kalman filter (KF), or extendedKalman filter (EKF) based implementation, or a hybrid implementation.Each position hypothesis may maintain own orientation estimate, which isperiodically updated, by the orientation filter, for each new sensorobservation consisting of acceleration, angular velocity, and magneticfield measurements. For each update step, the true EMF vector F is usedas the global magnetic field reference by the orientation filter. Thevector F is acquired from the map at the location indicated by thespecific location hypothesis, and is used by the orientation filtertogether with the sensor observation to update the orientation estimateof the specific location hypothesis.

In an embodiment, the mounted low range communication unit may becoupled to a controller and to a calibration circuitry & correctioncircuitry for co-operating in calibration of the PD 400. For example,the exact magnitude of the EMF may be predetermined and stored in thememory of the mounted low range communication unit. Then the PD 400 mayapply this information in obtaining knowledge of how much the measuredEMF magnitude deviates from the indicated, true EMV magnitude. Based onthe information, a correction of the values provided by the magnetometeror calibration of the magnetometer may be in order. The calibration orcorrection process may be carried out in various manners. Let usconsider the case where two RFID units are connected to each other. Thesecond RFID unit of the PD 400 may receive the true magnetic fieldinformation from the first, mounted RFID unit. Then the PD 400 may applythe received information in calibration of its magnetometer in order forthe magnetometer to provide accurate and true EMF vector data.Alternatively, the PD 400 may apply the received information incorrecting each value provided by the magnetometer so as to provideaccurate and true EMF vector data. In another embodiment, the PD 400 mayinform the correction that needs to be used for the EMF vector datareceived from this specific PD 400 to any element handling the EMFvalues provided by this specific PD 400. It should be clear that thedifference between the true and measured EMF vectors may be determinedat the PD 400 or at the mounted RFID unit, as the case may be. Thecalibration/correction may be for the strength of the EMF vector, and/orfor an EMF bias (offset) vector affecting to the EMF measurementsacquired by the PD 400. Alternatively, or in addition to, thecalibration/correction may be for the direction of the EMF vector. Thecalibration process may also calibrate/correct data related to thedirection and/or strength of the measured acceleration vectorrepresenting the direction of the gravitational force G. For this, thetrue value for G may have been determined for the predetermined locationof the mounted low range communication unit.

In an embodiment, the EMF bias (offset) vector affecting to the EMFvector measurements acquired by the PD 400 may be determined based onthe difference between the measured EMF vector and the true EMF vectorat the location or at the location hypothesis of the PD 400, wherein thetrue EMF vector may be obtained from the EMF map of the building 100.Once the bias is determined, it may be added to or deducted from themeasured value in order to obtain the correct EMF vector value, such asthe correct magnitude of the EMF. The bias thus represents thedifference of the measured value and the true value. It may be that thebias is caused by the equipment to which the PD 400 is mounted, or by ametallic object locating near (e.g. in a pocket or in a bag of a user)the PD 400. For example, when the PD 400 is mounted to the shoppingcart, the cart may cause the same bias to the measured EMF values ateach location of the building 100. Then it may be advantageous to firstmeasure the bias at one predetermined location and then apply the biasin other places inside the building 100. The predetermined location maybe detected as described above. Alternatively, the bias may be computedindividually for each location hypothesis at the beginning of thelocation estimation process, and the bias estimate for each hypothesismay be updated incrementally/periodically during the location estimationand/or tracking process. It should be noted that this procedure may alsoaid in determining probabilities for the location hypothesis. Forexample, if the location hypothesis, where the bias is determined, iscorrect, the bias is properly determined and may increase theprobability of the true location hypothesis due to correct, biasadjusted EMF vector observations. However, if the location hypothesis isnot correct, the bias determined at that position may be false. Thisfalse bias may also lead to erroneous EMF vector observations from thepoint of view of the incorrect position hypothesis, which may decreasethe probability associated with the false location hypothesis, and,thus, promote the correct location/position hypothesis. In addition oralternatively to the bias, a scaling factor may be similarly determinedand applied. The scaling factor may be used to calibrate themagnetometer of the PD 400 so that it provides EMF vector magnitudevalues which are comparable to the EMF vector magnitude values providedby another measuring device used to generate the EMF map. In addition,if the bias and/or scaling factor are updated incrementally/periodicallyfor each location hypothesis, the statistical properties, such asvariance, of the bias/scaling factor estimates may further provideinformation about the correctness of the specific position hypothesis.

Embodiments, as shown in FIGS. 10 and 11, provide apparatuses 400 and500 comprising at least one processor 452, 502 and at least one memory454, 504 including a computer program code, which are configured tocause the apparatuses to carry out functionalities according to theembodiments. The at least one processor 452, 502 may each be implementedwith a separate digital signal processor provided with suitable softwareembedded on a computer readable medium, or with a separate logiccircuit, such as an application specific integrated circuit (ASIC).

The apparatuses 400 and 500 may further comprise radio interfacecomponents 456 and 506 providing the apparatus 400, 500, respectively,with radio communication capabilities with the radio access network. Theradio interfaces 456 and 506 may be used to perform communicationcapabilities between the apparatuses 400 and 500. For the transmissionand/or reception of information, the apparatuses may apply, for example,wireless cellular radio network. The radio interfaces may also be usedfor measuring the WLAN signal strengths, for example. Alternatively, forexample, short range radio communication techniques including wirelesslocal area network and Bluetooth, may be applied. The radio interfaces456 and 506 may be used to communicate data related to the EMF map, themeasured EMF vectors, location estimation, initialization, NMF basedlocation discovery, etc.

User interfaces 458 and 508 may be used in operating the measuringdevice 400 and the database entity 500 by a user. The user interfaces458, 508 may each comprise buttons, a keyboard, means for receivingvoice commands, such as microphone, touch buttons, slide buttons, etc.

The apparatus 400 may comprise the terminal device of a cellularcommunication system, e.g. a computer (PC), a laptop, a tabloidcomputer, a cellular phone, a communicator, a smart phone, a palmcomputer, or any other communication apparatus. In another embodiment,the apparatus is comprised in such a terminal device, e.g. the apparatusmay comprise a circuitry, e.g. a chip, a processor, a micro controller,or a combination of such circuitries in the terminal device and causethe terminal device to carry out the above-described functionalities.Further, the apparatus 400 may be or comprise a module (to be attachedto the terminal device) providing connectivity, such as a plug-in unit,an “USB dongle”, or any other kind of unit.

The unit may be installed either inside the terminal device or attachedto the terminal device with a connector or even wirelessly. Theapparatus 500 as the database entity may be comprised in the networkaccessible by the apparatus 400 of FIG. 4. The apparatus 500 may be aserver computer.

As said, the apparatus 400, such as the positioning device, may comprisethe at least one processor 452. The at least one processor 452 maycomprise an indoor & outdoor navigation circuitry 460 for performingindoor or outdoor navigation. The indoor navigation may be on the basisof Earth's magnetic field measurement and EMF map, on the basis of NMFbased location discovery system, on the basis of RF signal strengths,and/or on the basis of visual or distance based location estimation. Thecircuitry 460 may also be responsible for identifying the correctposition in the building 100 and to cause initialization of the PD 400with the location estimate and/or with the at least part of the EMF map.The circuitry 460 may apply for example multi-hypotheses locationestimation. An application activation circuitry 464 may be responsibleof activation of a software function in or with respect to the PD 400.Such function may be for example the check-in in Foursquare or FacebookPlaces, activation of indoor navigation system, etc. A calibration &correction circuitry 466 may be responsible of performing a calibrationprocess of a magnetometer 470 and/or correcting the acquired informationfrom the magnetometer 470, for example.

The magnetometer 470 may be used to measure the EMF vector. There may bevarious other sensors or functional entities comprised in the PD 400.These may include an inertial measurement unit (IMU) 472, an odometer474, a low range communication unit 476, a GPS sensor 478, a radiofrequency (RF) based location tracking sensor 480, at last one camera482, at last one air pressure sensor 484, for example. A skilled personunderstood that these may be of use when performing the embodiments asdescribed earlier. For example, the RF based location tracking sensor480 may detect the RF signal from a near-by RF base station, (e.g. WLAN)and determine a location of the PD 400 based on the signal strength. TheIMU 472 and the odometer 472 may be used to detect movement of the PD400 and to enable three-dimensional orientation estimation of the PD400. The IMU 472 may comprise for example acceleration sensor and agyroscope, for example. The GPS sensor 478 may aid in outdoornavigation. The at least one camera 482 may be used to capture imagesfor the purposes of any of the embodiments described. As shown in FIG.9A, the PD 400 may comprise one camera on each side of the PD 400, i.e.cameras 482A and 482B) in order to enable capturing images from theceiling and from the floor, for example. Such additional information maybe useful in locating the PD 400 in the building with more accuracy. Theair pressure sensor 484 may be used to provide information on thealtitude of the PD 400, i.e. information on the location of the PD 400in the vertical direction. The memory 454 may comprise information ofthe magnetic field map 490 and of the floor plan 492 of the building100, for example. The memory may also store data related to the NMFbased location discovery 494, such as radio maps comprising the RSSIs ateach location from each detectable WLAN base station. The memory mayalso be used for storing measured EMF values, for example. However, assaid, the data may be also stored in the apparatus 500, for example,wherein the PD 400 has a network access to the apparatus 500.

Although not shown, the apparatus 400 may comprise a MARG sensor(described above) which may comprise or apply one or more of thefunctional entities of the apparatus 400, such as the magnetometer 470,an inertial measurement unit (NU) 472, an odometer 474, etc.

The apparatus 500, such as the database entity, may comprise the atleast one processor 502. The at least one processor 502 may compriseseveral circuitries. As an example, an indoor navigation circuitry 510for performing indoor navigation on the basis of Earth's magnetic fieldmeasurement and EMF map, on the basis of NMF location discovery, on thebasis of RF signal strengths, and/or on the basis of visual or distancebased location estimation. For the navigation, the memory 504 maycomprise the EMF map 540, the floor plan 542 of the building 100, NMFlocation discovery related data 544, such as radio maps, air pressuremaps, for example, or have access to that information. The circuitry 510may perform the location discovery and tracking based on measured EMFvectors acquired from the PD 400. Then the database entity 500 mayindicate the position of the PD 400 within the building 100.Alternatively, the circuitry 510 may provide, on request, at least partof the generated indoor magnetic field map to the PD 400 that is todetermine its location inside the building to which the EMF map isapplicable, as described. The circuitry 510 may also be responsible foridentifying the location estimate and/or the correct position in thebuilding 100 and to cause initialization of the PD 400 with the locationestimate and/or with the at least part of the EMF map 540. The circuitrymay select the part of the map on the basis of the location estimate.The circuitry 510 may apply for example multi-hypothesis locationestimator/tracker/filter, for example.

An application activation circuitry 514 may be responsible of causing anactivation of a software function in or with respect to the PD 400.

The database entity 500 may for example indicate to the PD 400 that anactivation of software function is in order. Such function may be forexample the check-in in Foursquare or Facebook Places, activation ofindoor navigation system, removal of access rights, etc. A calibration &correction circuitry 516 may be responsible of causing or co-operatingin a calibration process of a magnetometer 470 of the PD 400 and/orcorrecting the acquired information from the magnetometer 470, forexample. Further, the calibration & correction circuitry 516 may beresponsible of making the orientation correction with respect to theframe of reference of the PD 400. As said, in an embodiment, the PD 400is aware of the (X, Y, Z) world coordinate system and makes thecorrection between the frame of references itself before indicating thedirection of the EMF vector to the database entity 500. In anotherembodiment, the measuring device 400 indicates the possibly uncorrectedEMF vector direction to the database entity 500 along with informationregarding the three-dimensional orientation of the measuring device 400,and the database entity 500 makes the correction/adjustment by thecalibration & correction circuitry 516 so as to yield the true directionof the magnetic field vector to be comprised in the generated EMF map.

As may be understood by a skilled person from the description of theembodiments throughout the application and from FIGS. 10 and 11, theembodiments may be performed in the PD 400, in the database entity 500,or the execution of embodiments may be shared among the PD 400 and thedatabase entity 500. The skilled person also understands that anyrequired filtering logic may be applied to filter the EMF measurementsin order to improve the accuracy.

According to an aspect of the invention, there is provided a method,comprising: acquiring, by a positioning device or by a database entity,a location estimate of the positioning device that is to determine itslocation inside a building, wherein the location estimate is acquired onthe basis of an indoor non-magnetic field based location discoverysystem; accessing an indoor Earth's magnetic field, EMF, map ofplurality of buildings, wherein the indoor EMF map represents at leastone of magnitude and direction of the Earth's magnetic field affected bythe local structures of a corresponding building; and selecting a partof the indoor EMF map on the basis of the location estimate of thepositioning device, wherein the selected part of the indoor magneticfield map includes the indoor EMF map for the area in which thepositioning device currently is.

As used in this application, the term ‘circuitry’ refers to all of thefollowing: (a) hardware-only circuit implementations, such asimplementations in only analog and/or digital circuitry, and (b)combinations of circuits and software (and/or firmware), such as (asapplicable): (i) a combination of processor(s) or (ii) portions ofprocessor(s)/software including digital signal processor(s), software,and memory(ies) that work together to cause an apparatus to performvarious functions, and (c) circuits, such as a microprocessor(s) or aportion of a microprocessor(s), that require software or firmware foroperation, even if the software or firmware is not physically present.This definition of ‘circuitry’ applies to all uses of this term in thisapplication. As a further example, as used in this application, the term‘circuitry’ would also cover an implementation of merely a processor (ormultiple processors) or a portion of a processor and its (or their)accompanying software and/or firmware. The term ‘circuitry’ would alsocover, for example and if applicable to the particular element, abaseband integrated circuit or applications processor integrated circuitfor a mobile phone or a similar integrated circuit in a server, acellular network device, or another network device.

The techniques and methods described herein may be implemented byvarious means. For example, these techniques may be implemented inhardware (one or more devices), firmware (one or more devices), software(one or more modules), or combinations thereof. For a hardwareimplementation, the apparatus(es) of embodiments may be implementedwithin one or more application-specific integrated circuits (ASICs),digital signal processors (DSPs), digital signal processing devices(DSPDs), programmable logic devices (PLDs), field programmable gatearrays (FPGAs), processors, controllers, micro-controllers,microprocessors, other electronic units designed to perform thefunctions described herein, or a combination thereof. For firmware orsoftware, the implementation can be carried out through modules of atleast one chip set (e.g. procedures, functions, and so on) that performthe functions described herein. The software codes may be stored in amemory unit and executed by processors. The memory unit may beimplemented within the processor or externally to the processor. In thelatter case, it can be communicatively coupled to the processor viavarious means, as is known in the art. Additionally, the components ofthe systems described herein may be rearranged and/or complemented byadditional components in order to facilitate the achievements of thevarious aspects, etc., described with regard thereto, and they are notlimited to the precise configurations set forth in the given figures, aswill be appreciated by one skilled in the art.

According to an embodiment, there is provided an apparatus comprisingprocessing means configure to carry out an embodiment according to anyof the FIGS. 1 to 11. In an embodiment, the at least one processor 452or 502, the memory 454 or 504, respectively, and a correspondingcomputer program code form an embodiment of processing means forcarrying out the embodiments of the invention.

Embodiments as described may also be carried out in the form of acomputer process defined by a computer program. The computer program maybe in source code form, object code form, or in some intermediate form,and it may be stored in some sort of carrier, which may be any entity ordevice capable of carrying the program. For example, the computerprogram may be stored on a computer program distribution medium readableby a computer or a processor. The computer program medium may be, forexample but not limited to, a record medium, computer memory, read-onlymemory, electrical carrier signal, telecommunications signal, andsoftware distribution package, for example.

Even though the invention has been described above with reference to anexample according to the accompanying drawings, it is clear that theinvention is not restricted thereto but can be modified in several wayswithin the scope of the appended claims. Therefore, all words andexpressions should be interpreted broadly and they are intended toillustrate, not to restrict, the embodiment. It will be obvious to aperson skilled in the art that, as technology advances, the inventiveconcept can be implemented in various ways. Further, it is clear to aperson skilled in the art that the described embodiments may, but arenot required to, be combined with other embodiments in various ways.

1. An apparatus, comprising: at least one processor and at least onememory including a computer program code, wherein the at least onememory and the computer program code are configured to, with the atleast one processor, cause the apparatus at least to: acquire a locationestimate of a positioning device that is to determine its locationinside a building, wherein the location estimate is acquired on thebasis of an indoor non-magnetic field based location discovery system;access an indoor Earth's magnetic field, EMF, map of plurality ofbuildings, wherein the indoor EMF map represents at least one ofmagnitude and direction of the Earth's magnetic field affected by thelocal structures of a corresponding building; and select a part of theindoor EMF map on the basis of the location estimate of the positioningdevice, wherein the selected part of the indoor magnetic field mapincludes the indoor EMF map for the area in which the positioning devicecurrently is.
 2. The apparatus of claim 1, wherein the at least onememory and the computer program code are configured, with the at leastone processor, to cause the apparatus further to: apply the selectedpart of the indoor EMF map in an indoor EMF map-based locationdetermination, wherein the apparatus is or is comprised in thepositioning device.
 3. The apparatus of claim 1, wherein the at leastone memory and the computer program code are configured, with the atleast one processor, to cause the apparatus further to: provide, onrequest, the selected part of the indoor EMF map to the positioningdevice in order to allow the positioning device 400 to use the selectedpart of the map in locating itself.
 4. The apparatus of claim 1, whereinthe at least one memory and the computer program code are configured,with the at least one processor, to cause the apparatus further to:receive at least one measured EMF vector value from the positioningdevice; determine the location of the positioning device on the basis ofthe received at least one measured EMF vector value and the selectedpart of the indoor EMF map in an indoor EMF map-based locationdetermination; and indicate the determined location of the positioningdevice to the positioning device.
 5. The apparatus of claim 1, whereinthe at least one memory and the computer program code are configured,with the at least one processor, to cause the apparatus further to:determine probabilities for possible locations of the positioning deviceon the basis of the acquired location estimate; and limit the searchspace for an indoor EMF map-based location determination of thepositioning device on the basis of the determined probabilities.
 6. Theapparatus of claim 5, wherein limiting the search space comprisesapplying a probability distribution in the indoor EMF map-based locationdetermination of the positioning device, wherein the probabilitydistribution emphasizes those locations in the EMF map which are mostprobable locations of the positioning device according to the determinedprobabilities.
 7. The apparatus of claim 5, wherein the at least onememory and the computer program code are configured, with the at leastone processor, to cause the apparatus further to: select the part fromthe EMF map on the basis of the location estimate and the determinedprobabilities.
 8. The apparatus of claim 5, wherein the at least onememory and the computer program code are configured, with the at leastone processor, to cause the apparatus further to: apply the probabilitydistribution to the selected part of the EMF map.
 9. The apparatus ofclaim 1, wherein the applied indoor non-magnetic field based locationdiscovery system utilizes an indoor radio frequency base station basedlocation discovery system.
 10. The apparatus of claim 9, wherein theindoor radio frequency base station based location discovery systemapplies a wireless local area network.
 11. The apparatus of claim 1,wherein the applied indoor non-magnetic field based location discoverysystem utilizes at least one air pressure sensor.
 12. The apparatus ofclaim 1, wherein the applied indoor non-magnetic field based locationdiscovery system utilizes radio frequency identification.
 13. Theapparatus of claim 1, wherein the at least one memory and the computerprogram code are configured, with the at least one processor, to causethe apparatus further to: identify, on the basis of the locationestimate, the building, among a plurality of buildings, in which thepositioning device currently is, wherein the selected part of the indoorEMF map includes the indoor EMF map for the identified building.
 14. Theapparatus of claim 1, wherein the at least one memory and the computerprogram code are configured, with the at least one processor, to causethe apparatus further to: identify, on the basis of the locationestimate, the floor of a multi-story building in which the positioningdevice currently is, wherein the selected part of the indoor EMF mapincludes the indoor EMF map for the identified floor of the multi-storybuilding.
 15. The apparatus of claim 14, wherein the selected part ofthe indoor EMF map includes the indoor EMF map for the identified floorof the multi-story building and in addition the indoor EMF map for apredetermined number of adjacent floors.
 16. The apparatus of claim 1,wherein the at least one memory and the computer program code areconfigured, with the at least one processor, to cause the apparatusfurther to: detect the current location of the positioning device in thebuilding, wherein the current location is known on the basis of at leastpart of the indoor EMF map and magnetic field vector measurementsperformed by the positioning device; acquire at least one measurementparameter value related to the indoor non-magnetic field based locationdiscovery system at the detected current location of the positioningdevice; and apply the acquired at least one measurement parameter valuefor an update of a map of the indoor non-magnetic field based locationdiscovery system.
 17. The apparatus of claim 16, wherein the at leastone memory and the computer program code are configured, with the atleast one processor, to cause the apparatus further to: perform anupdate of a radio map on the basis of the acquired at least onemeasurement parameter value, wherein the at least one measurementparameter value comprises received signal strength of radio frequencysignals.
 18. The apparatus of claim 1, wherein the at least one memoryand the computer program code are configured, with the at least oneprocessor, to cause the apparatus further to: adjusting the acquiredlocation estimate further on the basis of at least one of the following:the topology or layout of the relevant building in which the positioningdevice is, a detected identity of the positioning device.
 19. Anapparatus, comprising: at least one processor and at least one memoryincluding a computer program code, wherein the at least one memory andthe computer program code are configured, with the at least oneprocessor, to cause a positioning device at least to: acquireinformation related to a location estimate of the positioning device ina building from an indoor non-magnetic field based location discoverysystem; cause a transmission of the acquired information related to thelocation estimate to a database entity; cause a reception of a part ofan indoor Earth's magnetic field map, EMF, of the building, wherein thereceived part of the indoor EMF map is selected on the basis of thelocation estimate of the positioning device; and apply the received partof the indoor EMF map in locating the positioning device in the building100.
 20. An apparatus, comprising: at least one processor and at leastone memory including a computer program code, wherein the at least onememory and the computer program code are configured, with the at leastone processor, to cause a positioning device at least to: acquireinformation related to a location estimate of the positioning device ina building from an indoor non-magnetic field based location discoverysystem; cause a transmission of the acquired information related to thelocation estimate to a database entity; cause a transmission of at leastone measured magnetic field vector value to the database entity in orderto enable the database entity to determine the location of thepositioning device on the basis of the received at least one measuredmagnetic field vector value and an indoor EMF map stored in the databaseentity; and cause a reception of the determined location of thepositioning device from the database entity.